<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@include file="../../common/taglib.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<%@include file="../../common/common-css.jsp" %>
<%@include file="../../common/common-js.jsp" %>
<%@include file="../../common/init.jsp" %>
<link rel="stylesheet" type="text/css"
	href="${pageContext.servletContext.contextPath }/css/fenyecss.css" />
	<style type="text/css">
	  input{font-size: 12px}
	</style>
</head>
<body>
  <div style="height: 100%;overflow-y: auto;">
<form id="fenye" name="fenye" action="${pageContext.servletContext.contextPath }/background/resources/query.html" method="post">
<div class="right" >
        	<div class="volume">
            	<img src="${pageContext.servletContext.contextPath }/images/toleft.png" style="margin:23px 0 0 2px;_margin:23px 0 0 0px;" />
            </div>
        	<div class="rightcon ">
            	<div class="title">
                	您当前的位置：首页 > 资源管理 > 资源列表
                </div>
                <input type="hidden" name="pageNow" id="pageNow"/>
                <table border="0" cellpadding="0" cellspacing="0" class="table1">
                	<tr>
                    	<td class="odd">资源名：
                        </td>
                        <td class="even"><input type="text" name="name"  value="${name}" style="height: 20px"/>
                        </td>
                        <td class="odd"  rowspan="2"  >
                        	<div class="button" >
                        	<input type="image" src="${pageContext.servletContext.contextPath }/images/cx.png" width="101" height="46"/>
                        	</div>
                        </td>
                    </tr>
                </table>
                 <table border="0" cellpadding="0" cellspacing="0" class="table2">
                 	<tr class="title">
                        <td width="10%" align="center">
                        	资源名
                        </td>
                         <td width="10%" align="center">
                        	资源KEY
                        </td>
                        <td  width="20%" align="center">
                        	资源URL
                        </td>
                         <td width="10%" align="center">
                        	资源类型
                        </td>
                        <td width="10%" align="center">
                        	上级资源
                        </td>
                        <td width="10%" style=" border-right:none;" align="center">
                        	操作
                        </td>
                    </tr>
                    <c:forEach var="key" items="${pageView.records}">
                    <tr class="odd">
                        <td align="center">
                        	${key.name}
                        </td>
                         <td align="center">
                        	${key.resKey}
                        </td>
                        <td  align="center">
                        	${key.resUrl}
                        </td>
                         <td align="center">
                        	<c:if test="${key.type eq '0'}">
						 <font color="red">目录</font>
			            </c:if>
			            <c:if test="${key.type eq '1'}">
			            <font color="blue">菜单</font>
			            </c:if>
			            <c:if test="${key.type eq '2'}">
			         	  按扭  	
			            </c:if>
                        </td>
                        <td align="center">
                        	${key.parentName}
                        </td>
                        <td  style=" border-right:none;" align="center">
            <sec:authorize ifAnyGranted="ROLE_sys_res_edit">
            <a href="${pageContext.servletContext.contextPath }/background/resources/getById.html?resourcesId=${key.id}&&typeKey=1">
                                     编辑
            </a>
            </sec:authorize>
            <sec:authorize ifAnyGranted="ROLE_sys_res_delete">
            	<a href="javascript:void(0);" onclick="deleteId('${pageContext.servletContext.contextPath }/background/resources/deleteById.html?resourcesId=${key.id}')">
            	删除</a></sec:authorize>
                        	
                        </td>
                    </tr>
                    </c:forEach>
                    <tr>
                    <%@include file="../../common/webfenye.jsp" %>
                    </tr>
                 </table>
                
            </div><!--rightcon-->
        </div>
</form>
</div>
</body>
</html>